Machine tool control process and apparatus therefor

ABSTRACT

A machine tool control process employs an N.C. and separate software e.g. operating either in a separate processor or within the N.C. Sub-programs generated by the software may be introduced into the N.C. during pauses in the N.C. e.g. for measurement type inspection or re-configuring the paths of cutting tools. The generation of the sub-programs may be carried out while the N.C. is operating.

This invention relates to the control of machine tools having a numericcontroller and ancillary computer control.

Conventionally machine tool control has been provided by systems similarto that shown in FIG. 1. They provide a programmable machine toolcontroller (called a numeric controller (NC)) which turns command codesinto actual machine movements, rests, and cutting actions etc. The NChas programmable logic, processing ability, and is linked to some userinterface (man-machine connection (MMC)).

Recently the MMC has been replaced in some instances with a computerrunning a commercially available operating system so that OEM's andthird party software developers can introduce their own software.

Further developments have allowed access by OEM and third party softwareto the machine data such as program status, machine position and machinevariables and the ability to transfer command code programs to and fromthe NC and MMC. Such access is gained by an interface known as anapplication programming interface (API).

However, such a system is limited because it is not possible to changecommand programs once they are running on the NC, but merely to overridefeed rates and to press the cycle stop button.

According to one aspect the present invention provides a machine toolcontrol process employing a programmable machine tool controller andseparate software, comprising the steps of:

-   -   executing a program in the machine tool controller; and    -   providing a step in the program which allows the program        execution to be paused until the controller is signalled to        continue by the separate software.

Preferably the separate software and machine tool controller communicatevia an API.

Preferably the said step in the program is a pause caused by thecontroller's optional stop instruction being invoked, and wherein theexternal software restarts the NC program via the API.

Alternatively the said step in the program is a pause caused by thecontroller waiting for a variable used by the controller to be changedby the separate software.

Preferably the machine tool control process further includes the stepsof:

-   -   loading a sub-program to the machine tool controller before or        during the step in the program; and    -   running the sub-program after the step in the program.

Preferably the machine tool control process is repeated so that asubsequent sub-program is loaded to the machine tool controller.

Preferably the separate software is employed to generate instructionswithin the sub-program(s). Preferably the generation takes place whilstthe program or sub-program is running.

According to another aspect the invention provides a machine toolcontrol process employing a programmable machine tool controller andseparate software, comprising the steps of:

-   -   executing a program in the machine tool controller;    -   operating the separate software to generate instructions within        a sub-program during the machine tool process; and    -   providing a step in the program which allows the sub-program to        be performed.

Preferably the generation of the instructions by the separate softwaretakes place following input into the separate software.

The invention extends to a software program suitable for the aboveprocesses.

Embodiments of the invention will now be described with reference to thedrawings, in which:

FIG. 1 shows a machine control arrangement;

FIG. 2 shows another machine control arrangement;

FIG. 3 shows a flow chart of a process control utilising the invention;

FIGS. 4 a and 4 b show flow charts of a process control utilisingfurther the invention; and

FIGS. 5 a and 5 b show flow charts for a process further utilising theinvention.

FIG. 1 shows a process control arrangement for a machine tool. A machinetool is controlled by a programmable machine tool controller, usuallycalled a numeric control (NC). The system shown has open architectureand therefore, access to data at the NC is possible via an applicationprogramming interface (API). In this description an API embraces anysoftware which allows communication between two processes. Anycommunication protocol can be used depending on the type of proprietaryNC used e.g. Dynamic Data Exchange (DDE). The MMC is used to loadprograms of “G code” commands into the NC via the API. In this systemthere is an additional external processor in this instance an externalPC which communicates with the NC via the API also and has separatesoftware which operates an external control process. The PC is used toload programs into the NC, to read the data of the NC and to control theprogram sequence of the NC.

FIG. 2 shows a similar arrangement to that illustrated in FIG. 1. Theexternal processor is integrated into the machine tool controller but isstill external in the sense that an external process distinct from theNC, communicates via the API. Separate software is utilised also.

Typically the arrangement of FIG. 1 might be used where retrofitting ofa system for operating the invention were performed. The arrangement ofFIG. 2 might be used where a system for operating the invention werenewly built, and/or the software on the MMC allows either by design orunintentionally the integration of third party software.

FIG. 3 shows one example of a machine tool process utilising the processof the invention. Where for example it is required to take informationfrom an NC (e.g. the X,Y,Z position of a machine tool spindle which isholding a measurement probe which is currently signalling that it istouching a workpiece surface) then the control process is looped untilthe data is read by the external process. The external process then setsa variable within the NC to a “continuing” value and the processcontinues. Such a control process allows the dynamic reading and writingof data at the NC without resetting the NC.

As an alternative to setting a variable, the machine's “optional stop”instruction may be used and the external process may be used to restartthe process.

FIGS. 4 a and 4 b show another machine tool control process employingthe process of the invention. FIG. 4 a shows the NC process whilst FIG.4 b shows the separate software process. Both processes are runconcurrently and communication between the two takes place via an API asillustrated in FIG. 3. Some NCs have the ability to accept one line ofcommand code at a time only, known as “drip-feed” mode. Typicallydownloading of the program takes place using an external tape reader orcomputer, with each line being executed soon after it is received.Drip-feed mode is provided for NCs to allow large programs to be heldusing external storage medium such as a PC or a paper or magnetic tapereader, and fed to the controller in small sections (often a line at atime). The sections are executed immediately and then discarded. In thisway programs that may be too large to fit in the controllers memory canbe run.

One embodiment of the invention enables drip feed mode to be provided onNC devices that do not readily support it.

This is done by running a program on the NC which continually runs thefollowing loop while a synchronisation variable in the program is notequal to the value used to exit drip feed:

-   i) set the synchronisation variable to a value that will cause the    program to wait;-   ii) wait for the synchronisation variable to have another value that    will indicate that the subprogram is ready;-   iii) call the subprogram;

Additionally, while this program is running on the NC, a separateprocess is running using separate software which in turn runs thefollowing loop while there are more lines to drip feed:

-   i) get the next line(s) to be drip fed;-   ii) format the line(s) as a subprogram-   iii) wait until the NC is ready for a that subprogram i.e. is    waiting for the subprogram;-   iv) upload that subprogram to the NC-   v) set the synchronisation value to a value that allows the NC    program to run the sub-program

An advantage of such a process control is that any line of code can bechanged as the process progresses. So, for example where an alterationto a tool path is required as a result of an inspection step performedby the process, then that alteration can be made to a command line orlines prior to downloading. This alteration can take place in theseparate software of the external processor whilst the NC program runs.

At the end of the process the external process is used to set thevariable to a process stop value and the process is then terminated.

FIGS. 5 a and 5 b show further flow charts for yet another process forcontrolling a machine tool utilising the invention. In this system theNC and external process functions are similar to those described above.Again FIG. 5 a shows the NC process whilst FIG. 5 b shows the separatesoftware process. Communication between the two is via an API. Insteadof feeding a line of code the external processor is used to generate asub-program (perhaps many lines of code long) which is inserted into themain program running on the NC. The downloading of the sub-program maytake place at any time after its creation by, or arrival at the externalprocess but before the external process sets the variable to the valuewhich indicates that the NC may call and run that sub-program.

In a process where a machine is used to produce a workpiece it is oftennecessary to check that that component is correctly produced e.g. thatits dimensions or surface finish are satisfactory. An inspection routinewill be required for such checking and it may be necessary to adjustparameters of the process to produce a satisfactory workpiece.

In the process illustrated, the external process is capable ofgenerating a workpiece-checking sub-program. The information required todo this may be input into the sub-program from one or a combination ofplaces i.e. the main program which may or may not be running in the NCand/or from an external data source e.g. previous inspectionsub-programs, and/or from user interaction. Once the sub-program iscomplete it may be downloaded to the NC (via the API) and the externalprocess will set the variable in the NC to a “run sub-program” value. Asdetailed previously the NC main program is delayed and waits for thatvariable to be set by the external process. Once set the NC calls andruns the current sub-program.

Any number of sub-programs may be run during the process. Eachsub-program may be different. For example an iterative process may takeplace whereby:

-   -   a main program operates a machining cycle to produce an article;    -   a sub-program is generated from the “G code” command lines of        the main program, so as to inspect the dimensions of the        workpiece produced by the main program;    -   the data is read by the external processor (maybe using the        process described with respect to FIG. 3);    -   the main program is continued; and    -   a further sub-program is generated by the external process        taking into account the inspection results of the first        sub-program, this further program containing “G” code command        lines to re-machine the workpiece correctly, or to alter the        nominal cutting path of the machine so that further workpieces        may be machined more accurately.

In the above example the process may be ongoing.

Reference is made in the description above to variables. In practicethese are specific machine parameters like X,Y,Z coordinates, but thevariable used to set the “run sub-program” or “don't run sub-program”flag will be a normally unused variable. It may be an integer orfloating point variable or an on/off type variable, so may have a valueor a state.

The external processor or process may be an industrial PC havingstandard architecture or a processor integrated into the NC device. Thusthe “separate software” referred to in the claims may be incorporated ina device external to the NC or may be incorporated in the NC deviceitself as a parallel task. The external process referred to above is theseparate software running on either an external processor or a processorintegrated into the NC device.

Sub-programs in this application means any additional instructions tothe NC device and includes macros used by the NC device.

1. A method of controlling a machine tool process employing aprogrammable machine tool controller performing the machine tool processand an ancillary computer on which separate software is implemented, themethod comprising the steps of: executing a machine tool process programimplemented in the machine tool controller; providing a step in themachine tool process program that allows the program execution to bepaused until the controller is signaled to continue by the separatesotware; and communicating between the machine tool controller and theancillary computer, and the separate software of the ancillary computersignaling continuation of the machine tool process of the machine toolcontroller.
 2. A method of controlling a machine tool process as claimedin claim 1, wherein the separate software and the machine toolcontroller communicate via an applications programming interface.
 3. Amethod of controlling a machine tool process as claimed in claim 2,wherein: the step in the program is a pause caused by an optional stopinstruction of the machine tool controller being invoked, and theseparate software restarts the machine tool process program via theapplications programming interface.
 4. A method of controlling a machinetool process as claimed in claim 1, wherein the step in the program is apause caused by the controller waiting for a variable used by thecontroller to be changed by the separate software.
 5. A method ofcontrolling a machine tool process as claimed in claim 1, wherein themachine tool process further includes the steps of: loading asub-program to the machine tool controller before or during the step inthe program; and running the sub-program after the step in the program.6. A method of controlling a machine tool process as claimed in claim 5,wherein the machine tool process is repeated so that a subsequentsub-program is loaded to the machine tool controller.
 7. A method ofcontrolling a machine tool process as claimed in claim 5, wherein theseparate software is employed to generate instructions within thesub-program(s).
 8. A method of controlling a machine tool process asclaimed in claim 7, wherein the generation takes place whilst theprogram or sub-program is running.
 9. A method of controlling a machinetool process employing a programmable machine tool controller performingthe machine tool process and an ancillary computer on which separatesoftware is implemented, the method comprising the steps of: executing amachine tool process program implemented in the machine tool controller;operating the separate software to generate instructions within asub-program during the machine tool process; communicating between thecontroller and the ancillary computer; and loading the sub-program tothe controller before or during a step in the program which allows thesub-program to be performed.
 10. A method of controlling a machine toolprocess as claimed in claim 9, wherein the generation of theinstructions by the separate software takes place following input intothe separate software.
 11. A method of controlling a machine toolprocess as claimed in claim 2, wherein the machine tool process furtherincludes the steps of: loading a sub-program to the machine toolcontroller before or during the step in the program; and running thesub-program after the step in the program.
 12. A method of controlling amachine tool process as claimed in claim 3, wherein the machine toolprocess further includes the steps of: loading a sub-program to themachine tool controller before or during the step in the program; andrunning the sub-program after the step in the program.
 13. A method ofcontrolling a machine tool process as claimed in claim 4, wherein themachine tool process further includes the steps of: loading asub-program to the machine tool controller before or during the step inthe program; and running the sub-program after the step in the program.14. A method of controlling a machine tool process as claimed in claim6, wherein the separate software is employed to generate instructionswithin the sub-program(s).
 15. A method of controlling a machine toolprocess employing a programmable machine tool controller performing themachine tool process and an ancillary computer on which separatesoftware is implemented, the method comprising the steps of: executing amachine tool process program implemented in the machine tool controller;setting, using the separate software, one of a continuation state, a runsub-program state, and a pause state for the machine tool controller;determining which of the continuation state, the run sub-program stateor the pause state the software is set for the machine tool controller;and responding to the determination by at least one of running asub-program implemented on the ancillary computer, pausing the machinetool process program, and continuing the machine tool process program.16. A method of controlling a machine tool process as claimed in claim15, wherein setting, using the separate software, one of a continuationstate, a run sub-program state, or a pause state for the machine toolcontroller comprises setting a variable to a first value correspondingto the continuation state, a second value corresponding to therun-subprogram state, or a third value corresponding to the pause state.17. A method of controlling a machine tool process as claimed in claim16, wherein determining which of the continuation state, the runsub-program state or the pause state the software set for the machinetool controller comprising determining which of the first value, thesecond value or third value was set for the variable.